package com.sjgtw.cloud.web.rainfallRange.controller;

import java.util.List;

import com.sjgtw.cloud.common.core.web.controller.BaseController;
import com.sjgtw.cloud.common.core.web.domain.AjaxResult;
import com.sjgtw.cloud.common.core.web.page.TableDataInfo;
import com.sjgtw.cloud.web.rainfallRange.domain.RainfallRange;
import com.sjgtw.cloud.web.rainfallRange.service.IRainfallRangeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 雨量警戒值Controller
 * 
 * @author ruoyi
 * @date 2024-03-17
 */
@RestController
@Api(tags = "3.3、雨量警戒值设置")
@RequestMapping("/rainfallRange")
public class RainfallRangeController extends BaseController
{
    @Autowired
    private IRainfallRangeService rainfallRangeService;

    /**
     * 查询雨量警戒值列表
     */

    @GetMapping("/list")
    @ApiOperation("查询列表")
    public TableDataInfo list(RainfallRange rainfallRange)
    {
        startPage();
        List<RainfallRange> list = rainfallRangeService.selectRainfallRangeList(rainfallRange);
        return getDataTable(list);
    }


    /**
     * 获取雨量警戒值详细信息
     */

/*    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return AjaxResult.success(rainfallRangeService.selectRainfallRangeById(id));
    }*/

/*    *//**
     * 新增雨量警戒值
     *//*

    @PostMapping
    public AjaxResult add(@RequestBody RainfallRange rainfallRange)
    {
        return toAjax(rainfallRangeService.insertRainfallRange(rainfallRange));
    }*/

    /**
     * 修改雨量警戒值
     */

    @PutMapping("/edit")
    @ApiOperation("修改")
    public AjaxResult edit(@RequestBody RainfallRange rainfallRange)
    {
        return toAjax(rainfallRangeService.updateRainfallRange(rainfallRange));
    }

 /*   *//**
     * 删除雨量警戒值
     *//*

	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(rainfallRangeService.deleteRainfallRangeByIds(ids));
    }*/
}
